cmake_minimum_required(VERSION 3.21)
set(CMAKE_CUDA_COMPILER /usr/local/cuda-12.2/bin/nvcc)
set(CUDACXX /usr/local/cuda-12.2/bin/nvcc)

project(cuda_work LANGUAGES CXX CUDA)

add_subdirectory(cuda01)
add_subdirectory(cuda02)
aux_source_directory(. SRC)
include_directories(${PROJECT_NAME} 
cuda01/include
cuda02/include
)
add_executable(${PROJECT_NAME} ${SRC})
target_link_libraries(${PROJECT_NAME} PRIVATE cuda01 cuda02 cublas cuda)